﻿namespace EyFramework.Library
{
    /// <summary>
    /// 窗体Form相关公共变量和方法
    /// </summary>
    public class FormGlobals
    {
        public static IMdiForm MainForm;

        public static void OpenForm(string menuName, string dllName, string formName, object[] param = null)
        {
            if (MainForm != null)
            {
                MainForm.OpenForm(menuName, dllName, formName, param);
            }
        }

        public static void OpenAlwaysNewForm(string menuName, string dllName, string formName, object[] param = null)
        {
            if (MainForm != null)
            {
                MainForm.OpenAlwaysNewForm(menuName, dllName, formName, param);
            }
        }
    }
}